package com.ld.security.server.admin.modules.ge.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.ld.security.common.core.anno.IdKey;
import com.ld.security.common.core.base.column.MapJson;
import com.ld.security.common.mybatis.anno.LabelKeys;
import com.ld.security.common.mybatis.anno.SqlKey;
import com.ld.security.common.mybatis.base.entity.LabelMap;
import com.ld.security.common.mybatis.base.entity.SuperEntity;
import com.ld.security.common.mybatis.constant.SqlCondition;
import com.ld.security.server.admin.modules.ge.sql.SqlProjectPo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@TableName("ge_table")
@ApiModel("表实体")
@Data
public class GeTableEntity extends SuperEntity implements LabelMap,SqlProjectPo
{



    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("工程编号")
    private String projectId;

    @LabelKeys(GeDataSourceEntity.class)
    @SqlKey(SqlCondition.eq)
    @ApiModelProperty("数据源编号")
    private String dataSourceId;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("标题")
    private String label;

    @SqlKey(SqlCondition.like)
    @ApiModelProperty("表明")
    private String tableName;

    private MapJson labelMap;


    @IdKey({"dataSourceId","tableName"})
    @Override
    public String getId() {
        return super.getId();
    }
}
